package collection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo1 {
    public static void main(String[] args) {
        Collection c = new ArrayList();
        c.add("张麒");
        c.add("one");
        c.add("two");
        System.out.println(c);
        System.out.println(c.size());
        System.out.println("是否是空集："+c.isEmpty());//判断是否是空集
        c.clear();//清空集合
        System.out.println(c);
        System.out.println(c.size());
        System.out.println("是否是空集："+c.isEmpty());
    }
}
